Author Topic: C::B and STLPort on ubuntu  (Read 5725 times)

Offline tainted

  • Single posting newcomer
  • *
  • Posts: 5
C::B and STLPort on ubuntu
« on: April 19, 2009, 03:08:11 pm »
Does anyone have a short description on how to use STLPort with C::B?
For me it's a nightmare right now, a mess with include paths i guess. I tried everything
i could think of but still i cannot build my project because i'm getting compilation errors
that don't make any sense as these are headers from GCC (it has something to do with __GNUC_PREREQ macro)
)
E.g.:
/usr/include/sys/types.h|158|error: missing binary operator before token "("|
/usr/include/bits/huge_val.h|28|error: missing binary operator before token "("|
/usr/include/bits/huge_val.h|30|error: missing binary operator before token "("|
/usr/include/math.h|392|error: missing binary operator before token "("|

 ...

/usr/local/include/stlport/using/cstring|12|error: ‘std::memmove’ has not been declared|
/usr/local/include/stlport/using/cstring|13|error: ‘std::memcpy’ has not been declared|
/usr/local/include/stlport/using/cstring|18|error: ‘std::strcoll’ has not been declared|
/usr/local/include/stlport/using/cstring|19|error: ‘std::strerror’ has not been declared|
/usr/local/include/stlport/using/cstring|20|error: ‘std::strxfrm’ has not been declared|

Thanks

Offline tainted

  • Single posting newcomer
  • *
  • Posts: 5
Re: C::B and STLPort on ubuntu
« Reply #1 on: April 26, 2009, 12:05:52 pm »
Anyone?
Following is the command line I'm using:
g++ -Weffc++ -g -Wall -fexceptions -I. -I../AStar/include -I/usr/local/include/stlport/stl -I/usr/local/include/stlport -I/usr/local/include/stlport/stl/config -I/usr/local/include/stlport/using -c /home/mac/work/games_graphics/AStar/AStar.cpp -o obj/Debug/AStar/AStar.o

I don't see anything bad with it, but I don't have much experience with the C::B IDE so I might not see what I'm doing wrong.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: C::B and STLPort on ubuntu
« Reply #2 on: April 26, 2009, 01:35:06 pm »
hello,

I'm not sure if I really can help, I'm not really a programmer, just an amateur, but I think your topic is a c++ issue, rather than of code::blocks. The moderators will lock it soon I suppose ;). Anyways, it would be useful, if you posted the corresponding code here as well, to understand the problem. It rather looks like you have forgotten the proper include statement, simply ...

Code
/usr/include/sys/types.h|158|error: missing binary operator before token "("|
/usr/include/bits/huge_val.h|28|error: missing binary operator before token "("|
/usr/include/bits/huge_val.h|30|error: missing binary operator before token "("|
/usr/include/math.h|392|error: missing binary operator before token "("|

the above could be a simple syntax error too, but without the code, who can tell ...

Code
/usr/local/include/stlport/using/cstring|12|error: ‘std::memmove’ has not been declared|
/usr/local/include/stlport/using/cstring|13|error: ‘std::memcpy’ has not been declared|
/usr/local/include/stlport/using/cstring|18|error: ‘std::strcoll’ has not been declared|
/usr/local/include/stlport/using/cstring|19|error: ‘std::strerror’ has not been declared|
/usr/local/include/stlport/using/cstring|20|error: ‘std::strxfrm’ has not been declared|

Here I would check if the proper #include <cstring> directive is in that file, if not, you won't be able to use anything of the functionality included, no matter what your compiler settings may be. There, after all, as I know, you let the compiler know where to find its things, your code still doesn't know ...

If all this makes no sense, or you already knew, or it does not help you, just put that I did'nt understand the problem and no harm done...

Regards

nausea
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: C::B and STLPort on ubuntu
« Reply #3 on: April 26, 2009, 06:55:33 pm »
Anyone?
Following is the command line I'm using:
g++ -Weffc++ -g -Wall -fexceptions -I. -I../AStar/include -I/usr/local/include/stlport/stl -I/usr/local/include/stlport -I/usr/local/include/stlport/stl/config -I/usr/local/include/stlport/using -c /home/mac/work/games_graphics/AStar/AStar.cpp -o obj/Debug/AStar/AStar.o

I don't see anything bad with it, but I don't have much experience with the C::B IDE so I might not see what I'm doing wrong.

I do not see the normal compiler include; is it not needed under Linux? It is under Windows; right after the STLPort includes.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org