In C++ you need to specify path to header files via -I option too
(Build|C++ Compiler|Include Directories property in NetBeans C++ projects).
11.11.2018 1:27, Emilian Bold пишет:
I'm not a C++ guy but I don't believe the linker is supposed to look
at header files? I think the problem is with `-lnana`, ie. are you
sure the library is in your LD_PATH or something like that?
--emi
On Sat, Nov 10, 2018 at 11:58 PM mr rupplin <[email protected]> wrote:
Can we force Netbeans to include .hpp files (containing structs and full
classes in some cases) such that the resulting library libxxxx.a contains the
.hpp files?
Otherwise I'm unsure how I tell the linker (ld) to requires the header files at
the time of linking. I get linking
errors like:
g++ -o dist/Release/MinGW64-Windows/nanabrowser
build/Release/MinGW64-Windows/NanaBrowser.o
build/Release/MinGW64-Windows/main.o -L../../../../../MinGW/lib -lnana
...
build/Release/MinGW64-Windows/NanaBrowser.o:NanaBrowser.cpp:(.text+0x4b):
undefined reference to `nana::rectangle::rectangle()'
../../../../../MinGW/lib/libnana.a(place.o):place.cpp:(.text+0x213a): undefined
reference to `nana::rectangle::rectangle(int, int, unsigned int, unsigned int)'
../../../../../MinGW/lib/libnana.a(place.o):place.cpp:(.text+0x2142): undefined
reference to `nana::rectangle::empty() const'
../../../../../MinGW/lib/libnana.a(place.o):place.cpp:(.text+0x3a02): undefined
reference to `nana::rectangle::dimension(nana::size const&)'
../../../../../MinGW/lib/libnana.a(place.o):place.cpp:(.text+0x3a0f): undefined
reference to `nana::rectangle::empty() const'
../../../../../MinGW/lib/libnana.a(place.o):place.cpp:(.text+0x3ccd): undefined
reference to `nana::size::size(unsigned int, unsigned int)'
../../../../../MinGW/lib/libnana.a(place.o):place.cpp:(.text+0x3cd9): undefined
reference to `nana::rectangle::dimension(nana::size const&)'
...
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Release/MinGW64-Windows/nanabrowser.exe] Error 1
Can you please help. My time is really up with this set of questions
concerning my safe. As an aside it's unclear if this is a linking error or a
g++ compiler issue as the header file(s) are not found when linking.
Ok, thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists