#14 odoors

開啟中
stevet4 年之前創建 · 3 條評論

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 commented 4 年之前
所有者

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 commented 4 年之前
所有者

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 commented 4 年之前
協同者

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.
Sign in to join this conversation.
未選擇里程碑
未指派成員
2 參與者
正在加載...
取消
保存
尚未有任何內容