How to set up a reference to gsm in MonoDevelop

I need to modify a c program and have been using MonoDevelop 2.4.2 on openSUSE 11.3 as the IDE.  I use MonoDevelop for C# on a lot of other programs so I'd like to be able to use it with the C programs too.

The c program compiles on the command line but when I'm in MonoDevelop it gives me errors on references to gsm functions:

Error: undefined reference to `gsm_encode'
Error: undefined reference to `gsm_option'
... etc...

Very new to c so can someone tell me how can I reference those so I can debug and compile in MonoDevelop?
StarDusterIIAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

expert_tanmayCommented:
Do you have gsm_encode, gsm_option in your c code. if this two are functions from other libraries you need to #include the header file in your code and if these are functions in your code itself define a prototype before you call them.

Cheers..
0
StarDusterIIAuthor Commented:
I do have gsm_encode and gsm_option, but I also have the gsm header file.  I did find a way to set up MonoDevelop to use the makefile and it compiles now but won't run the program.  When I try to run/debug, it just says make 'myProgram' is up to date.
0
expert_tanmayCommented:
A Make rule is composed of:

target: prerequisites
      commands

A target is considered "up to date" if it exists and is newer than its prerequisites. For example

example.o: example.c defs.h
            cc -c example.c

here example.o is the target, if example.o is newer than example.c and defs.h that shows you have a compiled target. Either delete example.o or make some changes to example.c

Cheers..
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

StarDusterIIAuthor Commented:
Not sure you understood... It compiles and mak runs fine... hence the output "myProgram" is up to date.  The problem is that after it's made, it won't "run" in MonoDevelop.  Whenever I try to run, all it does is build the project or tell me it's up to date.
0
expert_tanmayCommented:
Delete the myProgram.o file that is the object file and rebuild. If the object file is getting created and then you are getting some problem we will dig through the linking problem..

Cheers..
0
StarDusterIIAuthor Commented:
I deleted all the .o's and .d's in the build directory and they get rebuilt as well as the main program.
0
expert_tanmayCommented:
So now where are you stuck?
0
StarDusterIIAuthor Commented:
Basically, at the start.  I can compile the program but can't run it in debug mode within MonoDevelop.
0
expert_tanmayCommented:
Oh ok debug of c and c++ is still a bug with MonoDevelop. Please refer to http://go-mono.com/forums/#nabble-td2304192. It works well only with C#.

Cheers..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StarDusterIIAuthor Commented:
Humm... that doesn't look good does it... filed bug in August and no fix yet.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.