Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

external functions: multiple declarations

external functions: multiple declarations

Hello,

I'm currently attempting to connect UG NX and modelica.
I'm able to use all the correct header files and libraries (from unigraphics) using the annotations as mentioned in modelica specs 12.9.4

When simulating I'm getting a conflicting type error
/usr/ugs085/ugopen/uf_defs.h:98:23: error: conflicting types for €˜logical
/usr/include/f2c.h:24:13: note: previous declaration of €˜logical€™ was here
Now I see that in uf_defs.h there's an include guard used:
#ifndef LOGICAL_DEFINED
#define LOGICAL_DEFINED
(typedef of 'logical')
#endif

I've attempted to add another guard (LOGICAL_DEFINED might be used in modelica compiler somewhere...) by simply adding
#ifndef DIETER_VE_LOGICAL_DEFINED                                               
#define DIETER_VE_LOGICAL_DEFINED
But still I'm getting the same error...

Any other way to resolve this problem.
I had a similar problem when writing a function to acces mysql data, but there I could simply convert the few conflicting typedefs to comment without doing harm to mysql system. For NX i think the typedef logical might be of greater importance...

kind regards,
Dieter

Re: external functions: multiple declarations

I think we can easily move the f2c.h includes to the c-files instead of the headers... They are remnants of when the headers were filled with f2c-specific calls.

Re: external functions: multiple declarations

I made the change in r15753. If it does not work I will get an email from hudson complaining and I will update the status here.

Re: external functions: multiple declarations

r15754 should work better as I introduced a bug for the nonlinear system solver in 15753

Re: external functions: multiple declarations

Hello,

Thanks for the quick response,
but how do I have to update the current version to apply this patch/bug fix?

I'm not highly acquainted with svn updating, and where to find r15754 on nightly builds?
currently having omc, omedit, omnotebook and omoptim installed from source on ubuntu x64

regards,
Dieter

Re: external functions: multiple declarations

If you used "apt-get -b source openmodelica", it is as easy as running update and the command again.
If you are using the binary packages, 15755 was built yesterday and is available for installation (so apt-get update && apt-get upgrade will update it).

There are 0 guests and 0 other users also viewing this topic
You are here: