#14 odoors

오픈
stevet4 년 전을 오픈 · 3개의 코멘트
Steve Thielemann 코멘트됨, 4 년 전

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 코멘트됨, 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 코멘트됨, 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 코멘트됨, 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.
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 2명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.