#14 odoors

Öppen
öppnade 4 år sedan av stevet · 3 kommentarer

Ok, are we sure we're using the right version of odoors?

And here I thought odoors would be better then some other broken doorkit.

I've tried building the example doors, and only the voting one works sort of right. I know I've seen the ski one working, but it doesn't run now. >:(

Maybe we've got a broken version of it?

Adding the example doors to odoors, in CMakeLists.txt:

add_executable(ex-chat ex_chat.c)
target_link_libraries(ex-chat odoors)
add_executable(ex-diag ex_diag.c)
target_link_libraries(ex-diag odoors)
add_executable(ex-hello ex_hello.c)
target_link_libraries(ex-hello odoors)
add_executable(ex-ski ex_ski.c)
target_link_libraries(ex-ski odoors)
add_executable(ex-vote ex_vote.c)
target_link_libraries(ex-vote odoors)

In ex_ski.c:

// #include "genwrap.h"
#ifdef __linux__
#define msclock clock
#define MSCLOCKS_PER_SEC CLOCKS_PER_SEC
#endif

in ex_vote.c:

// #include "genwrap.h"

#ifdef __linux__
#define stricmp strcasecmp
#endif
Ok, are we sure we're using the right version of odoors? And here I thought odoors would be better then some other broken doorkit. I've tried building the example doors, and only the voting one works sort of right. I know I've seen the ski one working, but it doesn't run now. >:( Maybe we've got a broken version of it? Adding the example doors to odoors, in CMakeLists.txt: ``` add_executable(ex-chat ex_chat.c) target_link_libraries(ex-chat odoors) add_executable(ex-diag ex_diag.c) target_link_libraries(ex-diag odoors) add_executable(ex-hello ex_hello.c) target_link_libraries(ex-hello odoors) add_executable(ex-ski ex_ski.c) target_link_libraries(ex-ski odoors) add_executable(ex-vote ex_vote.c) target_link_libraries(ex-vote odoors) ``` In ex_ski.c: ```c // #include "genwrap.h" #ifdef __linux__ #define msclock clock #define MSCLOCKS_PER_SEC CLOCKS_PER_SEC #endif ``` in ex_vote.c: ```c // #include "genwrap.h" #ifdef __linux__ #define stricmp strcasecmp #endif ```
David Thielemann kommenterad 4 år sedan
Ägare

Yup that was it... we are now using this stevet's opendoors...

Looks like the examples work...

I did have to change and add in the above changes that you did to the 2 examples.... but all the examples work instead of just 1 somewhat working.

the ski example seems slow... but not sure if that's my environment or not.

Yup that was it... we are now using this stevet's opendoors... Looks like the examples work... I did have to change and add in the above changes that you did to the 2 examples.... but all the examples work instead of just 1 somewhat working. the ski example seems slow... but not sure if that's my environment or not.
David Thielemann refererade till detta ärende från en incheckning 4 år sedan
David Thielemann kommenterad 4 år sedan
Ägare

The CMakeLists.txt file for in opendoors

cmake_minimum_required(VERSION 3.0)

project(opendoors 
    VERSION 6.24
    LANGUAGES C)

# file(GLOB ODOORS_SRC *.c)

set(HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(HEADERS OpenDoor.h)

set(SOURCE_FILES ODAuto.c ODBlock.c ODCFile.c ODCmdLn.c ODCom.c ODCore.c 
ODDrBox.c ODEdit.c ODEdStr.c ODEmu.c ODGetIn.c ODGraph.c ODInEx1.c
ODInEx2.c ODInQue.c ODKrnl.c ODList.c ODLog.c ODMulti.c ODPlat.c 
ODPCB.c ODPopup.c ODPrntf.c ODRA.c ODScrn.c ODSpawn.c ODStand.c 
ODStat.c ODUtil.c ODWCat.c ODWin.c ODStr.c )

add_library(opendoors STATIC ${SOURCE_FILES} )

target_include_directories(opendoors PUBLIC $<BUILD_INTERFACE:${HEADERS_DIR}>)

add_executable(ex-chat ex_chat.c)
target_link_libraries(ex-chat opendoors)
add_executable(ex-diag ex_diag.c)
target_link_libraries(ex-diag opendoors)
add_executable(ex-hello ex_hello.c)
target_link_libraries(ex-hello opendoors)
add_executable(ex-ski ex_ski.c)
target_link_libraries(ex-ski opendoors)
add_executable(ex-vote ex_vote.c)
target_link_libraries(ex-vote opendoors)

This is expecting that you simply

git clone ssh://gitgreen/stevet/opendoors.git

The CMakeLists.txt file for in opendoors ``` cmake_minimum_required(VERSION 3.0) project(opendoors VERSION 6.24 LANGUAGES C) # file(GLOB ODOORS_SRC *.c) set(HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(HEADERS OpenDoor.h) set(SOURCE_FILES ODAuto.c ODBlock.c ODCFile.c ODCmdLn.c ODCom.c ODCore.c ODDrBox.c ODEdit.c ODEdStr.c ODEmu.c ODGetIn.c ODGraph.c ODInEx1.c ODInEx2.c ODInQue.c ODKrnl.c ODList.c ODLog.c ODMulti.c ODPlat.c ODPCB.c ODPopup.c ODPrntf.c ODRA.c ODScrn.c ODSpawn.c ODStand.c ODStat.c ODUtil.c ODWCat.c ODWin.c ODStr.c ) add_library(opendoors STATIC ${SOURCE_FILES} ) target_include_directories(opendoors PUBLIC $<BUILD_INTERFACE:${HEADERS_DIR}>) add_executable(ex-chat ex_chat.c) target_link_libraries(ex-chat opendoors) add_executable(ex-diag ex_diag.c) target_link_libraries(ex-diag opendoors) add_executable(ex-hello ex_hello.c) target_link_libraries(ex-hello opendoors) add_executable(ex-ski ex_ski.c) target_link_libraries(ex-ski opendoors) add_executable(ex-vote ex_vote.c) target_link_libraries(ex-vote opendoors) ``` This is expecting that you simply `git clone ssh://gitgreen/stevet/opendoors.git`
Steve Thielemann kommenterad 4 år sedan
Deltagare

Watch out if you ever need to edit the opendoors source files!

Codium likes to "help" you by sorting the include files -- which screws up the build process.

The #include "OpenDoor.h" needs to be before the other files, else you get pages of compiler errors about BYTE and BOOL types being undefined.

Watch out if you ever need to edit the opendoors source files! Codium likes to "help" you by sorting the include files -- which screws up the build process. The #include "OpenDoor.h" needs to be before the other files, else you get pages of compiler errors about BYTE and BOOL types being undefined.
Logga in för att delta i denna konversation.
Ingen Milsten
Ingen förvärvare
2 Deltagare
Laddar...
Avbryt
Spara
Det finns inget innehåll än.