Sorry for the barrage of newb questions. I actually try many things before I 
ask a question.  This one shouldn't be too tough.

I have a file named a.cpp:
#include <iostream>
#include "a.h"
void printme(void)
{
printf("0\n");    
}

I have a file named a.h:
#ifndef _a_f_12
#define _a_f_12
void printme(void);
#endif

I compiled this into an object file a.o

I copied a.o and a.h to CS/apps/tutorial/simpmap directory

In simpmap.cpp, I added two lines.
The first line is in the include:
#include "a.h"

The second line is when you press down arrow:
    if (kbd->GetKeyState (CSKEY_DOWN))
 {
obj_move = CS_VEC_DOWN * 3.0f;
printme(); //Line added
}

I went to /CS directory. I typed jam simpmap
I got:
/home/jim/Desktop/CS/apps/tutorial/simpmap/simpmap.cpp:159: warning: undefined 
reference to `printme()'

Simpmap runs, but when I press down arrow, it doesn't print 0, it segfaults.

What did I do wrong?

I want to port in code from another library into Simpmap, but I am starting 
with the easiest case, and it failed on me.


 
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to