Post Reply 
HPGCC 2.0 and Programmer's Notepad
04-04-2017, 03:44 AM
Post: #2
RE: HPGCC 2.0 and Programmer's Notepad
(04-03-2017 12:19 AM)Helix Wrote:  I'm currently learning C.
I can run small programs on my HP 50g with HPGCC 2.0 and Programmer's Notepad, as shown in this page.

Compilation works fine with the "Make this .hp" tool, as long as there is only one file to compile.
But if I want to create a project with a function in a second file, say myfunction in myfile.c, and with myfile.h for the header, then I get the error: "undefined reference to 'myfunction'.
It seems that the "Make this .hp" tool doesn't link the files.

I'm assuming here that you've used #include "myfile.h" in your myfile.c and put the myfile.h in the same directory? Wouldn't have been the first time I'd missed it out either. This error might be turning up at the preprocessor stage, not the linker stage.

(Post 59)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
HPGCC 2.0 and Programmer's Notepad - Helix - 04-03-2017, 12:19 AM
RE: HPGCC 2.0 and Programmer's Notepad - brickviking - 04-04-2017 03:44 AM

User(s) browsing this thread: 2 Guest(s)