Hi,
I'm struggling to get the build command properly set...
I'm trying to compile the libnfc libraries via Geany.
The file contains this info:
// This is same example as quick_start_example1.c but using // some helper functions existing in libnfc. // Those functions are not available yet in a library // so binary object must be linked statically: // $ gcc -o quick_start_example2 -lnfc -I../.. quick_start_example2.c ../../utils/nfc-utils.o
In a terminal everything works fine (although i had to move the -lnfc command to the end)
# gcc -o quick_start_example2 -I../.. quick_start_example2.c ../../utils/nfc-utils.o -lnf
Works fine.
I tried different things in geany like: gcc -Wall -o "%e" "%f" -I/home/glnd/libnfc-1.7.0-rc7 /home/glnd/libnfc-1.7.0-rc7/utils/nfc-utils.o -lnfc But without any success...
Can someone help me out?
Thx! Gert
On 13-08-02 09:25 AM, Gert Leenders wrote:
Hi,
I'm struggling to get the build command properly set...
I'm trying to compile the libnfc libraries via Geany.
The file contains this info:
// This is same example as quick_start_example1.c but using // some helper functions existing in libnfc. // Those functions are not available yet in a library // so binary object must be linked statically: // $ gcc -o quick_start_example2 -lnfc -I../.. quick_start_example2.c ../../utils/nfc-utils.o
In a terminal everything works fine (although i had to move the -lnfc command to the end)
# gcc -o quick_start_example2 -I../.. quick_start_example2.c ../../utils/nfc-utils.o -lnf
Works fine.
I tried different things in geany like: gcc -Wall -o "%e" "%f" -I/home/glnd/libnfc-1.7.0-rc7 /home/glnd/libnfc-1.7.0-rc7/utils/nfc-utils.o -lnfc But without any success...
Is there no errors or anything?
Cheers, Matthew Brush
My mistake... i just forgot to mention it :)
*quick_start_example2.c:18:29: fatal error: utils/nfc-utils.h: No such file or directory* * * As you probably expected...
On Fri, Aug 2, 2013 at 10:58 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 13-08-02 09:25 AM, Gert Leenders wrote:
Hi,
I'm struggling to get the build command properly set...
I'm trying to compile the libnfc libraries via Geany.
The file contains this info:
// This is same example as quick_start_example1.c but using // some helper functions existing in libnfc. // Those functions are not available yet in a library // so binary object must be linked statically: // $ gcc -o quick_start_example2 -lnfc -I../.. quick_start_example2.c ../../utils/nfc-utils.o
In a terminal everything works fine (although i had to move the -lnfc command to the end)
# gcc -o quick_start_example2 -I../.. quick_start_example2.c ../../utils/nfc-utils.o -lnf
Works fine.
I tried different things in geany like: gcc -Wall -o "%e" "%f" -I/home/glnd/libnfc-1.7.0-rc7 /home/glnd/libnfc-1.7.0-rc7/**utils/nfc-utils.o -lnfc But without any success...
Is there no errors or anything?
Cheers, Matthew Brush
______________________________**_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
On 13-08-02 02:03 PM, Gert Leenders wrote:
My mistake... i just forgot to mention it :)
*quick_start_example2.c:18:29: fatal error: utils/nfc-utils.h: No such file or directory*
As you probably expected...
It seems like your include `-I/home/glnd/libnfc-1.7.0-rc7` is not taking effect. Maybe move the option to before the source file option (%f). Also make sure there's a "utils/nfc-utils.h" file inside the directory you are passing to -I option (obviously).
P.S. You'd probably be better of to use a simple Makefile with Geany build commands, then you could compile your object files separately and link them into the final executable.
Cheers, Matthew Brush
On Fri, Aug 2, 2013 at 10:58 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 13-08-02 09:25 AM, Gert Leenders wrote:
Hi,
I'm struggling to get the build command properly set...
I'm trying to compile the libnfc libraries via Geany.
The file contains this info:
// This is same example as quick_start_example1.c but using // some helper functions existing in libnfc. // Those functions are not available yet in a library // so binary object must be linked statically: // $ gcc -o quick_start_example2 -lnfc -I../.. quick_start_example2.c ../../utils/nfc-utils.o
In a terminal everything works fine (although i had to move the -lnfc command to the end)
# gcc -o quick_start_example2 -I../.. quick_start_example2.c ../../utils/nfc-utils.o -lnf
Works fine.
I tried different things in geany like: gcc -Wall -o "%e" "%f" -I/home/glnd/libnfc-1.7.0-rc7 /home/glnd/libnfc-1.7.0-rc7/**utils/nfc-utils.o -lnfc But without any success...
Is there no errors or anything?
Cheers, Matthew Brush
______________________________**_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
P.S. You'd probably be better of to use a simple Makefile with Geany build commands, then you could compile your object files separately and link them into the final executable.
Can i find somewhere an example of this approach?
Thx!
On Fri, Aug 2, 2013 at 11:17 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 13-08-02 02:03 PM, Gert Leenders wrote:
My mistake... i just forgot to mention it :)
*quick_start_example2.c:18:29: fatal error: utils/nfc-utils.h: No such file or directory*
As you probably expected...
It seems like your include `-I/home/glnd/libnfc-1.7.0-**rc7` is not taking effect. Maybe move the option to before the source file option (%f). Also make sure there's a "utils/nfc-utils.h" file inside the directory you are passing to -I option (obviously).
P.S. You'd probably be better of to use a simple Makefile with Geany build commands, then you could compile your object files separately and link them into the final executable.
Cheers, Matthew Brush
On Fri, Aug 2, 2013 at 10:58 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 13-08-02 09:25 AM, Gert Leenders wrote:
Hi,
I'm struggling to get the build command properly set...
I'm trying to compile the libnfc libraries via Geany.
The file contains this info:
// This is same example as quick_start_example1.c but using // some helper functions existing in libnfc. // Those functions are not available yet in a library // so binary object must be linked statically: // $ gcc -o quick_start_example2 -lnfc -I../.. quick_start_example2.c ../../utils/nfc-utils.o
In a terminal everything works fine (although i had to move the -lnfc command to the end)
# gcc -o quick_start_example2 -I../.. quick_start_example2.c ../../utils/nfc-utils.o -lnf
Works fine.
I tried different things in geany like:
gcc -Wall -o "%e" "%f" -I/home/glnd/libnfc-1.7.0-rc7 /home/glnd/libnfc-1.7.0-rc7/****utils/nfc-utils.o -lnfc But without any success...
Is there no errors or anything?
Cheers, Matthew Brush
______________________________****_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-****bin/mailman/listinfo/usershttps://lists.geany.org/cgi-**bin/mailman/listinfo/users <htt**ps://lists.geany.org/cgi-bin/**mailman/listinfo/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
______________________________**_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
______________________________**_________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/usershttps://lists.geany.org/cgi-bin/mailman/listinfo/users
On 3 August 2013 07:55, Gert Leenders leenders.gert@gmail.com wrote:
P.S. You'd probably be better of to use a simple Makefile with Geany build commands, then you could compile your object files separately and link them into the final executable.
Matthew is right this is one longer term solution, but you still have to get the commands working first :)
Was there a reason you moved from using .. to using absolute pathnames when you moved the working command from the command line into Geany? Unfortunately we can't see what was your working directory when you ran gcc in the command line, so can't trace the ../..s to see if your absolute directory paths are the same thing, but the most likely problem is that they are not the same.
Can i find somewhere an example of this approach?
See http://mrbook.org/tutorials/make/ for a somewhat abbreviated tutorial.
Specifically the minimal example that gives :
all: g++ main.cpp hello.cpp factorial.cpp -o hello
But with the command replaced by your working one of course :)
Note: that *must* be a Tab character before the command, no spaces.
Cheers
Lex
Thx!
Lex,
I was doing trial and error to see if i could get i working. I tried both relative and absolute paths.
Here's a terminal dump....
glnd@ThinkStation-E30:~/libnfc-1.7.0-rc7/utils$ ls CMakeLists.txt nfc-list.c nfc-relay-picc libnfcutils.la nfc-list.o nfc-relay-picc.1 Makefile nfc-mfclassic nfc-relay-picc.c Makefile.am nfc-mfclassic.1 nfc-relay-picc.o Makefile.in nfc-mfclassic.c nfc-scan-device mifare.c nfc-mfclassic.o nfc-scan-device.1 mifare.h nfc-mfultralight nfc-scan-device.c mifare.o nfc-mfultralight.1 nfc-scan-device.o nfc-emulate-forum-tag4 nfc-mfultralight.c nfc-utils.c nfc-emulate-forum-tag4.1 nfc-mfultralight.o nfc-utils.h nfc-emulate-forum-tag4.c nfc-read-forum-tag3 nfc-utils.lo nfc-emulate-forum-tag4.o nfc-read-forum-tag3.1 nfc-utils.o nfc-list nfc-read-forum-tag3.c nfc-list.1 nfc-read-forum-tag3.o glnd@ThinkStation-E30:~/libnfc-1.7.0-rc7/utils$ pwd /home/glnd/libnfc-1.7.0-rc7/utils glnd@ThinkStation-E30:~/libnfc-1.7.0-rc7/utils$
Grtz, Gert
On Sat, Aug 3, 2013 at 1:38 AM, Lex Trotman elextr@gmail.com wrote:
On 3 August 2013 07:55, Gert Leenders leenders.gert@gmail.com wrote:
P.S. You'd probably be better of to use a simple Makefile with Geany build commands, then you could compile your object files separately and link them into the final executable.
Matthew is right this is one longer term solution, but you still have to get the commands working first :)
Was there a reason you moved from using .. to using absolute pathnames when you moved the working command from the command line into Geany? Unfortunately we can't see what was your working directory when you ran gcc in the command line, so can't trace the ../..s to see if your absolute directory paths are the same thing, but the most likely problem is that they are not the same.
Can i find somewhere an example of this approach?
See http://mrbook.org/tutorials/make/ for a somewhat abbreviated tutorial.
Specifically the minimal example that gives :
all: g++ main.cpp hello.cpp factorial.cpp -o hello
But with the command replaced by your working one of course :)
Note: that *must* be a Tab character before the command, no spaces.
Cheers
Lex
Thx!
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users