Search the web
Sign In
New User? Sign Up
omatrix
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
O-Matrix dll linking functionality   Message List  
Reply | Forward Message #427 of 454 |
I had some correspondence with Beau from Harmonic about compiling user
functions in C/C++ with the free compiler command line gcc in cygwin.
Below is the summary of the problem/solution.

Cheers,

Kurt
-----------------------------------

I initially tried to compile the code in cygwin with gcc (3.4.4) and
the dll that was created just froze O-Matrix when it was called (no
errors just freeze).

I later read that linking from VC/VC++ compiled programs can be
difficult from gcc (sometime it works sometimes it does not). A work
around is to use mingw from within cygwin. Below are the commands that
I used to generate the dll that worked.

In cygwin I moved to the directory containing the c++ files that I
wanted to put into the dll(note that mno-cygwin is the mingw flag).

$ gcc -mno-cygwin -c MYCOLMAX.CPP

this creates an object file MYCOLMAX.o

$ gcc -mno-cygwin -shared MYCOLMAX.o -o SAMPLE.dll

this produces the dll (SAMPLE.dll)

Calling this dll from O-Matrix produces the same response as the
SAMPLE.dll supplied.

You could additionally add maths optimisation/optimization flags to
the compiling and linking commands to make the dll to run faster.

Hope this helps others working in this area.




Tue Apr 15, 2008 6:35 pm

kurtforrester
Offline Offline
Send Email Send Email

Forward
Message #427 of 454 |
Expand Messages Author Sort by Date

I had some correspondence with Beau from Harmonic about compiling user functions in C/C++ with the free compiler command line gcc in cygwin. Below is the...
kurtforrester
Offline Send Email
Apr 15, 2008
6:35 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help