Opened 11 years ago
Closed 11 years ago
#2989 closed defect (fixed)
Bootstrapped compiler - build shared libOpenModelicaCompiler.dll also on Windows
| Reported by: | Adrian Pop | Owned by: | Adrian Pop | 
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.2 | 
| Component: | Installation program | Version: | trunk | 
| Keywords: | Cc: | 
Description (last modified by )
There are some issues when building the shared compiler on Windows.
Currently if you comment out STATIC=static inside Compiler/boot/Makefile.omdev.mingw you get undefined references to omc_assert and omc_throw. 
Where are these defined?
Change History (5)
comment:1 by , 11 years ago
| Description: | modified (diff) | 
|---|---|
| Owner: | changed from to | 
| Status: | new → accepted | 
comment:2 by , 11 years ago
comment:3 by , 11 years ago
No. They are defined via script Compiler/boot/GenerateEntryPoint.mos which calls API: generateEntryPoint which builds _main.c.
I'll try to split that file into _main_shared.c containing the needed omc_assert and other definitions which is compiled together with the dll.
comment:4 by , 11 years ago
OK. omc_assert_function & omc_assert_warning_function and defined in SimulationRuntime/c/util/omc_error.c. I thought omc_assert is also defined there.
comment:5 by , 11 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | accepted → closed | 
Fixed in r23420.
Note that I don't know how the dll is used from OMEdit and it might not work if is not used in a certain way.
Extreme care is needed especially with globals that are populated by phtread_get_specific.


I think they are defined in libOpenModelicaRuntime.a but you need to use -WI,--whole-archive to export all symbols.