0

I have several object files (.o) ,without source code, for a vxWorks project.

How can I test if they are OS independent or not?

I try to use them for a Linux project. They should include openGL stuff.

edit:

I have a Graphic board with a S3 on it. There is a driver available for it, but just for vxWorks. I found a startup script for vxWorks. In this several Objekt files will be loaded.

e.g this

ld 1,0,"lib/libGL.o" ld 1,0,"lib/libGLU.o" 

And I think they are independent from the OS.But I'm not sure. Because I try to use this board with Linux.

1 Answer 1

1

Link them against a main() function. If you get no errors, then they don't use OS specific functions.

[EDIT] Object files are linked, not included. You need to write a main() function which calls code in the .o files (check the OpenGL documentation for the names).

Now you can compile this with:

 cc -c -o main.o main.c cc -o main main.o lib/libGL.o lib/libGLU.o 
Sign up to request clarification or add additional context in comments.

3 Comments

First thanks for the Answer. I had the same idea, but to be honest I actually don't know how to do that exactly. Can you give me a short example?
Your question is pretty vague. That makes it hard to give specific advice. Unless you can tell me more details about the object files, I can't help you. Interesting questions are: What do you really mean by "OS independent"? Where did you find these files? Why do you think you can use them? Do you have any documentation?
I edit the question. How is the mechanism to include a object file without knowing the header name?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.