0

I having trouble with my CMake file in CLion running on Mac OSX 10.14. Currently, I have the following for a 32-bit program I copied from a Linux server using a built "supplied.o" file from an instructor. I wanted to work in CLion and wondering if it is possible to add to CLion to work outside of the Linux server?

cmake_minimum_required(VERSION 3.14)
project(app)

set(CMAKE_CXX_STANDARD 14)

include_directories(.)

add_executable(app
        dlist.cpp
        dlist.h
        main.cpp
        supplied.o)

set_target_properties(app PROPERTIES LINKER_LANGUAGE CXX )
set_target_properties(app PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")

I tried poking around here to see if I could figure it out, but it's possible I don't have a 32-bit G++ library (is that i386?) and not quite sure how to go about installing that. I have homebrew and feel comfortable enough with Linux to just work there, but I enjoy CLion for getting quick ideas out. Thanks for any help anyone can provide!

devonf
  • 1
  • You can't use a linux object file on OS X... – Shawn Oct 25 '19 at 02:33
  • If using `CLion` is mandate by your feelings towards it, and `Linux` is not a problem, simply install it on `Linux` - `CLion` is a cross platform tool. If you want to stick to your `macOS` machine, but have lab exercise that requires `Linux`, use `VirtualBox` and install `Linux` as virtual machine inside yours macOS. – Oo.oO Oct 25 '19 at 06:03

0 Answers0