NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Nicilled
Joined: 08 Nov 2011 Posts: 2
|
Posted: Tue Nov 08, 2011 5:16 pm Post subject: How change linker options? |
|
|
How can i change linker options? I need use object files before i link libraries. I have in command line of linker:
-o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o -lboost_filesystem -lboost_system
and output is:
g++ -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o -lboost_filesystem -lboost_system -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o
And i want output like this:
g++ -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o -lboost_filesystem -lboost_system
What i must change in linker option to get this?
If i have in command line only:
-lboost_filesystem -lboost_system
output is:
g++ -lboost_filesystem -lboost_system -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o
and this is wrong.  |
|
| Back to top |
|
 |
Vladimir Voskresensky - O Posted via mailing list.
|
Posted: Wed Nov 09, 2011 9:16 am Post subject: How change linker options? |
|
|
you should put
-lboost_filesystem -lboost_system
not into linker "additional options", but click in "Libraries" field, then Add
Option, then Other Option and put
-lboost_filesystem -lboost_system
Hope it helps,
Vladimir.
On 08.11.11 20:16, Nicilled wrote:
| Quote: | How can i change linker options? I need use object files before i link libraries. I have in command line of linker:
-o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o -lboost_filesystem -lboost_system
and output is:
g++ -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o -lboost_filesystem -lboost_system -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o
And i want output like this:
g++ -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o -lboost_filesystem -lboost_system
What i must change in linker option to get this? :?
If i have in command line only:
-lboost_filesystem -lboost_system
output is:
g++ -lboost_filesystem -lboost_system -o dist/Debug/GNU-Linux-x86/test-boost build/Debug/GNU-Linux-x86/main.o
and this is wrong. [Exclamation]
|
|
|
| Back to top |
|
 |
Nicilled
Joined: 08 Nov 2011 Posts: 2
|
Posted: Wed Nov 09, 2011 2:19 pm Post subject: |
|
|
Thanks. It helps.  |
|
| Back to top |
|
 |
TTorai
Joined: 20 May 2012 Posts: 1
|
Posted: Sun May 20, 2012 4:13 pm Post subject: Re: How change linker options? |
|
|
Thank You very much!
Your tip resolved my problem too: undefined reference to `mysql_init'
click in "Libraries" field, then Add
Option, then Other Option and put -lmysqlclient
| Vladimir Voskresensky - O wrote: | you should put
-lboost_filesystem -lboost_system
not into linker "additional options", but click in "Libraries" field, then Add
Option, then Other Option and put
-lboost_filesystem -lboost_system
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|