Mingw Compilation

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
obsidian
Posts: 5
Joined: Sat Nov 27, 2010 4:47 am

Mingw Compilation

Post by obsidian »

I am trying to get the sub20 code to compile on mingw using:

gcc -c -O2 -Wall -std=c99 -g -D__SUB_STATIC__ -I..\..\inc -o sub_app.o sub_app.c
gcc -c -O2 -Wall -std=c99 -g -D__SUB_STATIC__ -I..\..\inc -o cmd_pars.o cmd_pars.c
gcc -o sub_app sub_app.o cmd_pars.o -L"C:\Program Files\SUB-20\lib\msvc\Win32" -lsub20

This compiles with no errors or warnings.

on running sub_app.exe I get error:

"sub_find_devices: Unrecognized error -783276545"

I get this on both 32 and 64 bit machines.

Any experience with this?

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: Mingw Compilation

Post by serg »

Try to compile with WIN_BLD=1

Code: Select all

make WIN_BLD=1 
This works under cygwin

obsidian
Posts: 5
Joined: Sat Nov 27, 2010 4:47 am

Re: Mingw Compilation

Post by obsidian »

Thanks. I will try that.

Actually I noticed that it works anyway (with the adapter plugged in), just gives the wrong error msg when the sub20 is not found.

Post Reply