Linking with the appropriate library component

Dear all, I have tried to install boost by the packages that are supplied as a part of Cygwin which kept me doing a lot of work. Anyway, to test the library(lexical_cast) I have a very simple code, for the moment I can compile the file and the .o file is succesfully written, but in the link process I could not figure out which library and/or options I have to use. I have the obj file but can not produce an exe file. I used g++ -c -I"C:\cygwin\usr\local\include\boost-1_33_1\boost" filename.cc and filename.o is in the directory. Can somebody share his/her ideas with me. Best regards, Umut

g++ -c -I"C:\cygwin\usr\local\include\boost-1_33_1\boost" filename.cc
Personally, I use
g++ -c -I/usr/local/include/boost-1_33_1 filename.cc
and the "official"

# umut.tabak@student.kuleuven.be / 2006-06-12 23:29:38 +0200:
Dear all,
I have tried to install boost by the packages that are supplied as a part of Cygwin which kept me doing a lot of work. Anyway, to test the library(lexical_cast) I have a very simple code, for the moment I can compile the file and the .o file is succesfully written, but in the link process I could not figure out which library and/or options I have to use. I have the obj file but can not produce an exe file.
I used
g++ -c -I"C:\cygwin\usr\local\include\boost-1_33_1\boost" filename.cc
and
filename.o
is in the directory.
Can somebody share his/her ideas with me.
lexical_cast is a "header-only library", boost/lexical_cast.hpp is all you need. g++ -I"C:\cygwin\usr\local\include\boost-1_33_1\boost" filename.cc Notice the missing "-c". You'll want to use the -o option as well. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
participants (3)
-
Dale McCoy
-
Roman Neuhauser
-
Umut TABAK