dao icon indicating copy to clipboard operation
dao copied to clipboard

MSVC 2019: Small errors with self-build

Open IngwiePhoenix opened this issue 4 years ago • 2 comments
trafficstars

Hello!

Trying to build Dao on my Windows 10 maschine as I am testing out how it'd work with the V programming language. I found the following errors:

"state" is not a member of "DThreadData": https://github.com/daokoder/dao/blob/master/kernel/daoThread.c#L275 https://github.com/daokoder/dao/blob/master/kernel/daoThread.c#L291

"thdSpecData" is no member of "DThreadData" https://github.com/daokoder/dao/blob/master/kernel/daoThread.c#L349

"TlsSetValue": Not enough arguments for call: https://github.com/daokoder/dao/blob/master/kernel/daoThread.c#L349

Uninitialized variable "j" used: https://github.com/daokoder/dao/blob/master/kernel/daoProcess.c#L1765 (Typo?)

Compilation command used: cl .\kernel\*.c -I kernel /DWIN32 /DDAO_WITH_CONCURRENT /DDAO_STATIC_BUILD /Fedao.exe

Also where can I find the full documentation for all the syntax? I was not able to see the load keyword documented anywhere - just within one of the tests within test.

Kind regards, Ingwie

IngwiePhoenix avatar Feb 13 '21 02:02 IngwiePhoenix

Also, when not compiling with DAO_WITH_CONCURRENT, an error is shown that __impl_timeGetTime() can not be resolved. You might want to add #pragma comment(lib, "winmm.lib") to fix that :)

IngwiePhoenix avatar Feb 13 '21 02:02 IngwiePhoenix

Hi and sorry for the delay. Dao uses it's own daomake tool which generates standard Makefiles depending on the platform. daomake itself uses the great C ecosystem to do all the heavy lifting with system properties detection etc. and thus the generated Makefiles are tailored to the system daomake itself was built for.

In other words you have to build daomake first (which should be quite easy - and it should work cross-platform as it's written in plain C but (un)surprisingly includes core parts of the Dao interpreter to allow writing the daomakefiles using a subset of Dao :wink:).

Feel free to take a look at the PKGBUILD https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=dao-git (yeah, there are quite some ad-hoc patches using sed -i etc. to use os-level libraries instead of those distributed with Dao, but you'll get the idea).

dumblob avatar May 31 '21 19:05 dumblob